package com.neutech.neusys.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.neutech.neusys.po.Sys;
import com.neutech.neusys.service.SysService;

@Controller
@RequestMapping("/his/sys")
public class SysController {
	@Autowired
	private SysService sysService; 
	
	@RequestMapping("getSysById")
	public @ResponseBody Sys getSysById(Integer id){
		return sysService.getSys(id);		 
	}
	@RequestMapping("deleteSysById")
	public @ResponseBody void deleteSysById(Integer id){
		sysService.deleteSys(id);
	}
	@RequestMapping("updateSysById")
	public @ResponseBody void updateSysById(Integer id){
		sysService.updateSys(id);
	}
	@RequestMapping("addSysByName")
	public @ResponseBody Sys addSysById(String sysName){
		return sysService.addSys(sysName);
	}
}
